var success = require('../success')
,   error   = require('../error')
,   sort    = require('./sort');

module.exports = function(Class, type, body){
    if(Class.sign){

        if(!body.authKey)
            return error(1);

        var sortAuth = sort(body);

        if(body.authKey !== sortAuth)
            return error(1);
    };

    if(Class.auth){
        // if(!body.authKey)
        //     return error(1);
        //
        // var sortAuth = sort(body);
        //
        // if(body.authKey !== sortAuth)
        //     return error(1);
    };

    return success();
};